/* NAS音乐播放器 - 现代化界面样式 */

/* 全局滚动条样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Webkit浏览器滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

::-webkit-scrollbar-thumb:active {
  background: rgba(255, 255, 255, 0.4);
}

::-webkit-scrollbar-corner {
  background: rgba(255, 255, 255, 0.05);
}

/* Firefox滚动条样式 */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.05);
}

/* 特定区域的滚动条样式 */
.sidebar::-webkit-scrollbar,
.td-drawer-body::-webkit-scrollbar,
.search-results-list::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track,
.td-drawer-body::-webkit-scrollbar-track,
.search-results-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
}

.sidebar::-webkit-scrollbar-thumb,
.td-drawer-body::-webkit-scrollbar-thumb,
.search-results-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
}

.sidebar::-webkit-scrollbar-thumb:hover,
.td-drawer-body::-webkit-scrollbar-thumb:hover,
.search-results-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* 音乐列表滚动条样式 */
.music-list::-webkit-scrollbar {
  width: 6px;
}

.music-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

.music-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
}

.music-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* 歌词区域滚动条样式 */
.td-lyrics::-webkit-scrollbar {
  width: 6px;
}

.td-lyrics::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.td-lyrics::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
}

.td-lyrics::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* 通用滚动容器样式 */
.scroll-container::-webkit-scrollbar {
  width: 8px;
}

.scroll-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.scroll-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  transition: background 0.3s ease;
}

.scroll-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* 模态框滚动条样式 */
.modal-content::-webkit-scrollbar,
.dialog-content::-webkit-scrollbar {
  width: 6px;
}

.modal-content::-webkit-scrollbar-track,
.dialog-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
}

.modal-content::-webkit-scrollbar-thumb,
.dialog-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
}

.modal-content::-webkit-scrollbar-thumb:hover,
.dialog-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background: #0a0a0a;
  color: #ffffff;
  overflow: hidden;
  margin: 0;
  padding: 0;
  height: 100vh;
}

#root {
  height: 100vh;
  width: 100%;
}

.app-container {
  background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
  color: #ffffff;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  overflow: hidden;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-container .main-container{
  display: flex;
  flex-direction: row;
  flex: 1;
  overflow: hidden;
}

/* 侧边栏 */
.app-container .main-container .sidebar {
  width: 280px;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transition: transform 0.3s ease;
  z-index: 1000;
  position: relative;
}

/* 移动端遮罩层 */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  backdrop-filter: blur(2px);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.app-container .main-container .sidebar:not(.open) {
  transform: translateX(-100%);
  display: none;
}

.app-container .main-container .sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-container .main-container .sidebar-header h1 {
  margin: 0;
  font-size: 1.8em;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(255, 107, 107, 0.5);
  font-weight: 700;
}

.app-container .main-container .sidebar-toggle {
  background: transparent;
  border: none;
  color: #ccc;
  font-size: 1.2em;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.app-container .main-container .sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.app-container .main-container .sidebar-nav {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.app-container .main-container .nav-item {
  background: transparent;
  border: none;
  color: #ccc;
  padding: 12px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  font-size: 14px;
  position: relative;
  overflow: hidden;
  font-weight: 500;
  text-decoration: none;
}

.app-container .main-container .nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
}

.app-container .main-container .nav-item:hover::before {
  left: 100%;
}

.app-container .main-container .nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: translateX(5px);
}

.app-container .main-container .nav-item.active {
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
  font-weight: 600;
}

/* 主内容区域 */
.app-container .main-container .main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 页面容器 */
.app-container .main-container .page-container {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.app-container .main-container .page-content {
  flex: 1;
  overflow: hidden;
}

/* 大屏：更宽侧边栏与内容留白 */
@media (min-width: 1600px) {
  .app-container .main-container .sidebar { width: 320px; }
  .app-container .main-container .sidebar-header { padding: 24px; }
  .app-container .main-container .sidebar-nav { padding: 24px; }
}

/* 移动端适配 */
@media (max-width: 900px) {
  .app-container .main-container .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1001;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .app-container .main-container .sidebar.open {
    transform: translateX(0);
  }
  
  .app-container .main-container .sidebar:not(.open) {
    transform: translateX(-100%);
  }
  
  .app-container .main-container .main-content {
    margin-left: 0;
  }
  
  /* 移动端遮罩层样式 */
  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    backdrop-filter: blur(3px);
    animation: fadeIn 0.3s ease;
  }
  
  /* 移动端滚动条样式 */
  ::-webkit-scrollbar {
    width: 4px;
    height: 4px;
  }
  
  ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
  }
  
  ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
  }
}

/* 通用页面样式 */
.app-container .main-container .loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: #888;
}

.app-container .main-container .loading-spinner {
  font-size: 2em;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.app-container .main-container .end-state {
  text-align: center;
  padding: 20px;
  color: #888;
  font-style: italic;
}

.app-container .main-container .empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #888;
}

/* 全局Loading样式 */
.global-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(4px);
}

.global-loading-content {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.global-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid #4ecdc4;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.global-loading-message {
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
}

/* 全局Toast样式 */
.global-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10001;
  animation: slideInRight 0.3s ease-out;
}

.global-toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  min-width: 300px;
  max-width: 400px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.global-toast-success {
  background: linear-gradient(135deg, #4ecdc4, #44a08d);
  border-color: rgba(78, 205, 196, 0.3);
}

.global-toast-error {
  background: linear-gradient(135deg, #ff6b6b, #ee5a52);
  border-color: rgba(255, 107, 107, 0.3);
}

.global-toast-warning {
  background: linear-gradient(135deg, #ffa726, #ff9800);
  border-color: rgba(255, 167, 38, 0.3);
}

.global-toast-info {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-color: rgba(102, 126, 234, 0.3);
}

.global-toast-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.global-toast-message {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  flex: 1;
}

.global-toast-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.global-toast-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .global-loading-content {
    padding: 24px;
    margin: 20px;
  }
  
  .global-loading-spinner {
    width: 32px;
    height: 32px;
  }
  
  .global-loading-message {
    font-size: 14px;
  }
  
  .global-toast {
    top: 10px;
    right: 10px;
    left: 10px;
  }
  
  .global-toast-content {
    min-width: auto;
    max-width: none;
    padding: 12px 16px;
  }
  
  .global-toast-message {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .global-loading-content {
    padding: 20px;
  }
  
  .global-loading-spinner {
    width: 28px;
    height: 28px;
  }
  
  .global-loading-message {
    font-size: 13px;
  }
  
  .global-toast-content {
    padding: 10px 14px;
  }
  
  .global-toast-message {
    font-size: 12px;
  }
  
  .global-toast-icon {
    font-size: 18px;
  }
}